﻿* Encoding: UTF-8.

RECODE partyid (1=1) (2=2) (3 thru 5=3) (6 thru 7=4) (else=99) INTO pid1.
VARIABLE LABELS pid1 'Party ID without closers'.
VALUE LABELS pid1 (1)Conservative (2)Labour (3)Other party (4)No party (99)Missing.
EXECUTE. 

RECODE hobolt7 (1=1) (2=2) (3 thru 4=3) (else=99) INTO eurefid1.
VARIABLE LABELS eurefid1 'EU ref ID without closers'.
VALUE LABELS eurefid1 (1)Leaver (2)Remainer (3)Neither (99)Missing.
EXECUTE. 

RECODE W8 (0 thru 99999=copy) INTO weightfinal.
VARIABLE LABELS weightfinal 'Final weight'.
EXECUTE. 
RECODE weight (0 thru 99999=copy) INTO weightfinal.
VARIABLE LABELS weightfinal 'Final weight'.
EXECUTE. 

*FIGURE 1

WEIGHT BY weightfinal.

CROSSTABS
  /TABLES=Wave BY eurefid1
  /FORMAT=AVALUE TABLES
  /CELLS=COUNT
  /COUNT ROUND CELL.

*TABLE 4

UNIANOVA q9 BY eurefid1 pid1
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /PRINT PARAMETER
  /CRITERIA=ALPHA(.05)
  /DESIGN=eurefid1 pid1.

*APPENDIX 1

CROSSTABS
  /TABLES=eurefid1 BY pid1 BY wave
  /FORMAT=AVALUE TABLES
  /CELLS= ROW 
  /COUNT ROUND CELL.


*APPENDIX 4 

RECODE education_age (1 thru 2=1) (3 thru 4=2) (5 thru 6=3) (else=99) INTO educat.
VARIABLE LABELS educat 'Education'.
VALUE LABELS educat (1)16 or under (2)17-19 (3)20+ (99)Missing.
EXECUTE. 

RECODE socialgrade_cie (1=1) (2=2) (3=3) (4=4) (5=5) (6=6) (else=99) INTO class.
VARIABLE LABELS class 'MRC class'.
VALUE LABELS class (1)A (2)B (3)C1 (4)C2 (5)D (6)E (99)Missing.
EXECUTE. 

RECODE weight (0 thru 99999=copy) INTO weightfinal.
VARIABLE LABELS weightfinal 'Final weight'.
EXECUTE. 

UNIANOVA q9 BY eurefid1 pid1 gender region_GOR educat class WITH age 
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /PRINT PARAMETER
  /CRITERIA=ALPHA(.05)
  /DESIGN=eurefid1 pid1 gender region_GOR age educat class .

